import React from 'react';
import ReactDOM from 'react-dom';
import {BrowserRouter as Router, Route} from 'react-router-dom';
import Home from "./components/Home";
import Counter from "./components/Counter";
import {Provider} from 'react-redux';
import store from './store';
import {ConnectedRouter} from 'connected-react-router'
import history from './history';


ReactDOM.render(
    <Provider store={store}>
        <ConnectedRouter history={history}>
            <Route  exact path="/" component={Home}/>
            <Route path="/counter" component={Counter}/>
        </ConnectedRouter>
    </Provider>, document.getElementById('root')
);



//ConnectedRouter  可以替代 Router：
